package cn.bookcycle.order.util;

import java.util.Iterator;

import cn.bookcycle.order.constant.BusinessConstant;
import net.sf.json.JSONObject;

/**
 * 数据工具类
 *
 * @author liufenglin
 * @date 2018年4月3日
 */
public class DataUtil {
	public static JSONObject updateJSONObject(JSONObject referencedJS, JSONObject newJS) {
		Iterator it = referencedJS.keys();
		String key = null;
		Object value = null;
		while (it.hasNext()) {
			key = (String) it.next();
			value = referencedJS.get(key);
			
			if (!BusinessConstant.ORDER_ID.equals(key) && !BusinessConstant.APP_ID.equals(key)) {
				newJS.put(key, value);
			} else {}
		}
		return newJS;
	}
}
